export const RbacUserStatusValueEnum = {
  '0': '禁用',
  '1': '启用',
  '2': '离职',
};

export enum DataPermEnum {
  AllCompany = '0',
  DepartmentAndSubDepartments = '1',
  CurrentDepartment = '2',
  Individual = '3',
}

export const DataPermValueEnum: { [key: string]: string } = {
  [DataPermEnum.AllCompany]: '全公司',
  [DataPermEnum.DepartmentAndSubDepartments]: '部门及下级部门',
  [DataPermEnum.CurrentDepartment]: '当前部门',
  [DataPermEnum.Individual]: '个人',
};

export enum StatusEnum {
  Enabled = '1',
  Disabled = '0',
}

export const StatusValueEnum: { [key: string]: string } = {
  [StatusEnum.Enabled]: '开启',
  [StatusEnum.Disabled]: '未开启',
};

export const IsValueEnum: { [key: string]: string } = {
  [StatusEnum.Enabled]: '是',
  [StatusEnum.Disabled]: '否',
};

export enum AuthModeEnum {
  ADMIN_PHONE = 'admin_phone',
  ADMIN_USERNAME = 'admin_username',
  // ADMIN_DINGDING = "admin_dingding",

  USER_PHONE = 'user_phone',
  // USER_PHONE_CAPTCHA = "user_phone_captcha",
  // USER_USERNAME = "user_username",
  // USER_TOURISTS = "user_tourists",
  USER_WXOPENID = 'user_wxopenid',
  USER_ALIOPENID = 'user_aliopenid',

  CLIENT_CREDENTIALS = 'client_credentials',
  REFRESH_TOKEN = 'refresh_token',
}

// 如果需要生成对应的描述，可以使用一个映射对象
export const AuthModeValueEnum: { [key in AuthModeEnum]: string } = {
  [AuthModeEnum.ADMIN_PHONE]: '管理员手机登录',
  [AuthModeEnum.ADMIN_USERNAME]: '管理员用户名密码登录',
  // [AuthMode.ADMIN_DINGDING]: "管理员钉钉授权登录",

  [AuthModeEnum.USER_PHONE]: 'C端用户手机号一键登录',
  // [AuthMode.USER_PHONE_CAPTCHA]: "C端用户手机号验证码",
  // [AuthMode.USER_USERNAME]: "C端用户用户名密码登录",
  // [AuthMode.USER_TOURISTS]: "C端用户游客登录",
  [AuthModeEnum.USER_WXOPENID]: 'C端用户微信授权登录',
  [AuthModeEnum.USER_ALIOPENID]: 'C端用户支付宝授权登录',

  [AuthModeEnum.CLIENT_CREDENTIALS]: '客户端登录',
  [AuthModeEnum.REFRESH_TOKEN]: '刷新令牌',
};

export enum PermissionType {
  Admin = '1',
  Open = '2',
}

export const PermissionTypeValueEnum = {
  [PermissionType.Admin]: 'Admin 接口',
  [PermissionType.Open]: 'Open 接口',
};

export const UserStatusValueEnum = {
  0: '在使用中',
  1: '已删除',
};

export enum GrantType {
  AdminUsername = 'admin_username',
  ClientCredentials = 'client_credentials',
}
